﻿<UserControl
    x:Class="XnReader.WinRT.Navigation"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="90">
    <UserControl.Resources>
        <CollectionViewSource x:Name="cvsLeft" Source="{Binding LeftNavs}"/>
        <CollectionViewSource x:Name="cvsRight" Source="{Binding RightNavs}"/>
        <DataTemplate x:Key="itLeftNav">
            <Border Width="80" Background="#FF039C32">
                <StackPanel Orientation="Vertical" >
                    <TextBlock Text="{Binding Image}" Width="60" FontSize="48" Foreground="White" TextAlignment="Center"></TextBlock>
                    <TextBlock Text="{Binding Title}" ToolTipService.ToolTip="{Binding Tips}" FontWeight="Bold" Foreground="White" FontSize="16" TextAlignment="Center" FontFamily="Microsoft YaHei" ></TextBlock>
                </StackPanel>
            </Border>
        </DataTemplate>
        <DataTemplate x:Key="itRightNav">
            <!--<Border Width="80"  Background="#FF009E01">-->
            <!--<Border Width="80"  Background="#FFD34927">-->
            <!--<Border Width="80"  Background="#E5E7EAD5">-->
            <Border Width="80"  Background="#FF039C32">
                <StackPanel Orientation="Vertical" >
                    <TextBlock Text="{Binding Image}" Width="60" FontSize="48" Foreground="White" TextAlignment="Center" FontFamily="Microsoft YaHei"></TextBlock>
                    <TextBlock Text="{Binding Title}" FontSize="16" FontWeight="Bold" Foreground="White" TextAlignment="Center" FontFamily="Microsoft YaHei"></TextBlock>
                </StackPanel>
            </Border>
        </DataTemplate>
    </UserControl.Resources>
    <Grid >
        <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Horizontal" >
            <GridView
            x:Name="gvLeftNavs"
            ItemsSource="{Binding Source={StaticResource cvsLeft}}"
            ItemTemplate="{StaticResource itLeftNav}"
            SelectionMode="None"
            IsSwipeEnabled="false" 
            IsItemClickEnabled="True"
            ItemClick="GvLeftNavsItemClick">
            </GridView>
        </StackPanel>
        <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
            <GridView
            x:Name="gvRightNavs"
            ItemsSource="{Binding Source={StaticResource cvsRight}}"
            ItemTemplate="{StaticResource itRightNav}"
            SelectionMode="None"
            IsSwipeEnabled="false"
            IsItemClickEnabled="True"
            ItemClick="GvRightNavsItemClick">
            </GridView>
        </StackPanel>
    </Grid>
</UserControl>
